﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VueAndNetCoreEfApi.PoModel.departmentyrh
{
    [Table("department")]
    public class department
    {
        [Key]
        public int dp_id { get; set; }
        public string dp_name { get; set; }
        public int dp_father_id { get; set; }
        public DateTime dp_createtime { get; set; }
        public string ff { get {
                if (dp_father_id == 1)
                {
                    return "北京超蜗有限公司";
                }
                else if(dp_father_id==2)
                {
                    return "CEO";
                }
                else if (dp_father_id == 3)
                {
                    return "财务部";
                }
                else if (dp_father_id == 4)
                {
                    return "人事部";
                }
                else if (dp_father_id == 5)
                {
                    return "市场部";
                }
                else if (dp_father_id == 6)
                {
                    return "运营部";
                }
                return "无";
            } }
    }
}
